package com.xlabs.client.shared;

import java.util.List;

import com.google.gwt.requestfactory.shared.InstanceRequest;
import com.google.gwt.requestfactory.shared.Request;
import com.google.gwt.requestfactory.shared.RequestContext;
import com.google.gwt.requestfactory.shared.Service;
import com.xlabs.server.DO.Reply;

@Service(Reply.class)
public interface ReplyRequest extends RequestContext
{
	/**
	* @return a request object
	*/
	Request<ReplyProxy> findReply(String id);
	
	/**
	 * Gets a question responses according to the given index and range. 
	 * @param questionEncodedKey Question key. 
	 * @param startIndexInc start Index.
	 * @param endIndexExcl end index. 
	 * @param direction query direction (left or right). 
	 * @param pageSize page size. 
	 * @param callback call back.
	 */
    Request<List<ReplyProxy>> getRepliesByIndex(
			String questionEncodedKey, 
			String startIndexInc,
			String endIndexExcl, 
			int direction, 
			int pageSize);
	
	/**
	* @return a request object
	*/
	InstanceRequest<ReplyProxy, Void> persist();
	
	/**
	* @return a request object
	*/
	InstanceRequest<ReplyProxy, Void> remove();
}
